<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02JS数据类型</title>
</head>
<body>

<script>
    // JS数据类型
    // 原始数据类型 string number boolean null undefined symbol
    // 引用数据类型 Object Number Boolean Array Function
    var e = true;
    var f = false;
    console.log(e,typeof e);
    console.log(f,typeof f);
    //声明了变量但未赋值,会得到undefined,未定义类型
    var g;
    console.log(g,typeof g);
    //定义JS对象
    let obj = {
        name:'张三',
        age:18,
        sex:'男'
    };
    var obj2 = {
        name:'李四',
        age:25,
    };
    console.log(obj2)
    console.log(obj,typeof obj);
    console.log(obj.name,obj.age,obj.sex);

    // JS数组
    var arr = [1,'张三',true,1.65,obj,obj2];
    console.log(arr,typeof arr)
</script>
</body>
</html>